import sequelize from "../db/db";
import { DataTypes } from "sequelize";

const User = sequelize.define(
  "User",
  {
    name: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    pwd: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    nickName: {
      type: DataTypes.STRING,
      allowNull: false,
    },
    imgUrl: {
      type: DataTypes.STRING,
      allowNull: true,
    },
    right: {
      type: DataTypes.STRING,
      allowNull: true,
    },
  },
  { paranoid: true }
);

export default User;
